// src/composables/useAudioWS.js
import { audioEngine } from "./audioEngine";
const eng = audioEngine();

export const audioState = eng.state;
export const connect = eng.connectAudioWS;
export const disconnect = eng.disconnectAudioWS;
export const unlockAudio = eng.unlockAudio;
export const attachMainAudio = eng.attachMainAudio;
export const attachEventAudio = eng.attachEventAudio;

export const fillMain = eng.fillMain;
export const pushEventByText = eng.pushEventByText;
export const synthesize = eng.synthesize;

export const tryPlayNext = eng.tryPlayNext;
export const onLiveEvent = eng.onDanmuEvent;

// 也导出成默认，方便用法
export default function useAudioWS() { return { ...eng, audioState }; }
